package customerEnter.Frame.JDBCDao.UseQuery;

import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.jdbc.support.rowset.SqlRowSetMetaData;

import customerEnter.Frame.DaoDataTransmission.DaoFramePameTransmission;
import customerEnter.Frame.JDBCDao.Interface.DaoFrameUseTypeInterface;

public class DaoFrameUseTypeStringsImpl implements DaoFrameUseTypeInterface<String[]> {

	public <T, K> String[] useDaoFrameDataType(DaoFramePameTransmission<T, K> daoFramePameTransmission) {
		SqlRowSet sqlRowSet = daoFramePameTransmission.sqlRowSet;
		SqlRowSetMetaData sqlRowSetMetaData = sqlRowSet.getMetaData();
		String[] strings = new String[] {};
		int in = sqlRowSetMetaData.getColumnCount();
		while (sqlRowSet.next()) {
			for (int i = 1; i <= in; i++) {
				strings[i - 1] = sqlRowSet.getString(i);
			}
			break;
		}
		return strings;
	}

}
